<?php
/**
 * Joomla! 1.5 component JoomGPSTracks
 *
 * @version $Id: user.php 2009-06-24 15:40:19 svn $
 * @author Michael Pfister
 * @package joomGPStracks
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');

echo $this->lh;
?>
<form action="<?php echo $this->action; ?>" method="post" name="adminForm">
<table width="100%">
	<tr>
		<td>
            <?php echo JText::_('Display Num') .'&nbsp;' . $this->pagination->getLimitBox(); ?>
        </td>
        <td style="text-align:right">
            <?php echo $this->pagination->getResultsCounter( ); ?>
        </td>
	</tr>
</table>
<table class="tracktable">
    <thead>
        <tr class="sectiontableheader">
            <th>#</th>
            <th><?php echo JHTML::_('grid.sort', JText::_( 'GPS_TITLE' ), 'title', @$this->lists['order_Dir'], @$this->lists['order'], 'tracks' ); ?></th>
            <th width="80px"><?php echo JHTML::_('grid.sort', JText::_( 'GPS_CAT' ), 'cat', @$this->lists['order_Dir'], @$this->lists['order'], 'tracks' ); ?></th>
            <th width="80px"><?php echo JHTML::_('grid.sort', JText::_( 'GPS_HITS' ), 'hits', @$this->lists['order_Dir'], @$this->lists['order'], 'tracks' ); ?></th>
            <th width="80px"><?php echo JText::_('edit'); ?></th>
            <th width="80px"><?php echo JText::_('delete'); ?></th>
        </tr>
    </thead>
<tbody>
    <?php
	$k = 0;
	for ($i=0, $n=count( $this->rows ); $i < $n; $i++)
	{
        $row = &$this->rows[$i];
        $link = JRoute::_('index.php?option=com_joomgpstracks&view=tracks&layout=track&id='.$row->id);
    ?>
    <tr class="sectiontableentry<?php echo $k; ?>">
        <td align="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
        <td><a href="<?php echo $link; ?>"><?php echo $row->title; ?></a></td>
        <td><img src="<?php echo JURI::base(); ?>/images/joomgpstracks/cats/<?php echo $row->image; ?>" alt="<?php echo $row->cat; ?>" title="<?php echo $row->cat; ?>" width="32px" /></td>
        <td><?php echo $row->hits; ?></td>
        <td><a href="index.php?option=com_joomgpstracks&view=tracks&layout=form&id=<?php echo $row->id; ?>"><img src="./images/edit_f2.png" width="16px" /></a></td>
        <td><a href="index.php?option=com_joomgpstracks&controller=tracks&task=delete&id=<?php echo $row->id; ?>"><img src="./images/cancel_f2.png" width="16px" /></a></td>
    </tr>
    <?php
    $k = 1 - $k;
    }
    ?>
</tbody>
<tfoot>
    <tr class="sectiontablefooter">
        <td colspan="6" align="center">
            <?php echo $this->pagination->getPagesLinks( $this->rows ); ?>
            <?php echo $this->pagination->getResultsCounter( ); ?>
        </td>
    </tr>
</tfoot>
</table>
<input type="hidden" name="option" value="com_joomgpstracks" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>
<?php
echo $this->footer;
?>
